import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
import Home from "@/views/home/Home.vue";

const routes: Array<RouteRecordRaw> = [
  { path: "/xxx", name: "index", component: Home },
  {
    path: "/create",
    name: "create",
    component: () => import("@/views/user/User.vue"),
  },

  {
    path: "/",
    name: "Home",
    component: () => import("@/views/home/Home.vue"),
    meta: {
      title: "首页",
    },
  },
  {
    path: "/index",
    name: "Index",
    component: () => import("@/views/user/User.vue"),
    meta: {
      title: "Spring",
    },
  },
  {
    path: "/index",
    name: "Index",
    component: () => import("@/views/user/User.vue"),
    meta: {
      title: "Spring Boot",
    },
  },
  {
    path: "/index",
    name: "Index",
    component: () => import("@/views/user/User.vue"),
    meta: {
      title: "Spring Cloud",
    },
  },
  {
    path: "/index",
    name: "Index",
    component: () => import("@/views/user/User.vue"),
    meta: {
      title: "前端",
    },
  },
  {
    path: "/index",
    name: "Index",
    component: () => import("@/views/user/User.vue"),
    meta: {
      title: "工具",
    },
  },
  {
    path: "/user",
    name: "User",
    component: () => import("@/views/user/User.vue"),
    meta: {
      title: "关于我",
    },
  },
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login/Login.vue"),
    meta: {
      title: "登录",
    },
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes: routes,
});

export default router;
